package enums;

interface Fruit {
    enum Apple implements Fruit {
        /**
         * 红富士
         */
        hfs,
        /**
         * 蛇果
         */
        snake;
    }
    enum Banana implements Fruit {
        /**
         * 苹果蕉
         */
        apple,
        /**
         * 皇帝蕉
         */
        emperor;
    }
}

public class EnumDemo {
    public static void main(String[] args) {
        Fruit[] fruits = {Fruit.Apple.hfs, Fruit.Apple.snake, Fruit.Banana.apple, Fruit.Banana.emperor};
        for (Fruit fruit : fruits) {
            System.out.println(fruit);
        }
    }
}
